package com.helios.baseFunction;

import android.view.KeyEvent;

public class Define {
	
	/**
	 * 关闭Activity前的等待时间
	 */
	public static final int ACTIVITY_FINISH_WAITING = 300;
	
	/**
	 * HTTP请求数据事件类型
	 */
	public static enum EVENT_HTTP{
		HTTP_HOME_RECOMMEND, 	//首页推荐位
		HTTP_APP_SETTING,		//设置接口
	}
	
	/**
	 * 本地共享数据类型
	 */
	public static enum TYPE_SHAREDATA{
		TYPE_STRING,
		TYPE_INT,
		TYPE_BOOLEAN,
		TYPE_FLOAT,
		TYPE_LONG
	}
	
	/**
	 * 本地数据库数据关键字
	 */
	public static enum KEY_DBDATA{
		
	}
	
	/**
	 * activity页面关键字
	 */
	public static enum KEY_PAGEID{
		// 设置首页
		PAGE_GENERAL,
		PAGE_GRAPHICSOUNDSET_HOME,
		PAGE_PLAYSET_HOME,
		PAGE_PLAYSET_VIDEORATIO,
		PAGE_PREFERENCESET_HOME,
		PAGE_DEFAULTINPUT,
		PAGE_SIGNLLIGHT,
		
		PAGE_AUDIOPLAYER,
		PAGE_DIGITALAUDIOOUTPUT,
		
		PAGE_RESETSET_HOME,
		PAGE_RESETSET_PROGRESS,
		
		PAGE_NETWORK_SETTING,
		PAGE_WIFI_SETINFORMATION,
		PAGE_WIFI_LIST,
		PAGE_WIFI_INPUTPASSWORD,
		PAGE_WIFI_ADDWIFI,
		PAGE_WIFI_SECURITY,
		PAGE_CABLE_SETINFORMATION,
		PAGE_SETTING_MAC,
		PAGE_SETTING_SPEED,
		PAGE_SETTING_DETETION,
		PAGE_PLAYSETTING_VIDEOSOURCE,

        PAGE_BLUETOOTH_DEVICE_DETAIL,
        PAGE_BLUETOOTH_SETTING_HOME,

		PAGE_GRAPHIC_SETTING,
		PAGE_PLAYSET_DIFINITION,
		PAGE_FEEDBACK_HOME,
		PAGE_FEEDBACK_LOGUPLOAD,
		PAGE_FEEDBACK_QRCODE,
		
		PAGE_DEVICE_NAME,
		PAGE_NEW_DEVICE_NAME,
		
		PAGE_SCREEN_SAVER_SETTING,
		
		PAGE_SECURITY_SETTING,
		// 城市定位
		PAGE_PREFERENCE_LOCAITON,
		
		PAGE_ABOUT_INFO,
		PAGE_ABOUT_LAWINFO,
		PAGE_ABOUT_LAWDETAIL,
		PAGE_ABOUT_MOBILE,
		PAGE_ABOUT_CONTACTUS,
		
	}
	
	/**
	 * 源优化状态定义
	 */
	public static enum STATE_SRCSPPED{
		STATE_START,
		STATE_FINISH,
		STATE_ERROR
	}
	/**
	 * LED信号灯颜色定义
	 */
	public static enum LED_COLORTYPE{
		COLOR_DARK,
		COLOR_RED,
		COLOR_ORANGE,
		COLOR_YELLOW,
		COLOR_GREEN,
		COLOR_CYAN,
		COLOR_BLUE,
		COLOR_PURPLE
	
	}

	/**
	 * 图像参数关键字定义
	 */
	public static enum KEY_PICPARAM{
		/**
		 * 背光
		 */
		KEY_BACKLIGHT,
		/**
		 * 亮度
		 */
		KEY_BRIGHTNESS,
		/**
		 * 清晰度
		 */
		KEY_DEFINITION,
		/**
		 * 对比度
		 */
		KEY_CONTRAST,
		/**
		 * 饱和度
		 */
		KEY_SATURATION
	}
	

	/**
	 * 图像参数关键字定义
	 */
	public static enum TYPE_COLORTEMP{
		/**
		 * 冷色
		 */
		KEY_COOL,
		/**
		 * 标准
		 */
		KEY_STANDARD,
		/**
		 * 暖色
		 */
		KEY_WARM
		
		
	}
	
	/**
	 * 数字音频输出定义
	 */
	public static enum TYPE_AUDIOMODE{
		KEY_PCM,
		KEY_RAW
	}
	
	/**
	 * 应用程序数据定义
	 */
	public static enum KEY_APPDATA{
		KEY_ADDWIFIDATA
	}
	
	/**
	 * SharedPreference 存储Key
	 */
	public static class KEY_SHAREDPREF{
		//声音播放器
		public static final String KEY_AUDIOPLAYER= "key_audioPlayer";
		
		//数字音频输出
		public static final String KEY_DIGITALAUDIOOUTPUT= "key_digitalAudioOutput";
		
		//按键音开关
		public static final String KEY_KEYPADTONESWTICH = "key_keypadToneSwitch";

		//夜间音量控制开关
		public static final String KEY_MIDNIGHTVOLUMECONTROLSWITCH = "key_midnightVolumeControlSwitch";

		//视频比例
		public static final String KEY_VIDEORATIO = "key_videoRatio";
		
		//跳过片头片尾开关
		public static final String KEY_SKIPTITLEENDSWITCH = "key_skipTitleEndSwitch";
		
		//电视名字
		public static final String KEY_MYTVNAME = "key_myTVName";
		
		//城市定位
		public static final String KEY_MYCITY = "key_myCity";
		
		//默认输入法
		public static final String KEY_DEFAULTINPUT= "key_defaultinput";
		
		//自动切换信号源开关
		public static final String KEY_AUTOCHANGESOURCESWITCH = "key_autoChangeSourceSwitch";
		
		//屏保时间
		public static final String KEY_SCREENSAVERTIME = "key_screenSaverTime";
		
		//是否保留已安装应用
		public static final String KEY_RESERVEINSTALLED = "key_reserveinstalled";		
		
		//图像参数设置
		public static final String KEY_BACKGROUND_LIGHT = "backgroudLight";
		public static final String KEY_LIGHT = "light";
		public static final String KEY_DFINITION = "difinition";
		public static final String KEY_RATIO = "ratio";
		public static final String KEY_STURATION = "sturation";
		public static final String KEY_COLORTEMPERATURE = "colorTemperature";
		
		//域名
		public static final String KEY_DOMAINLIST = "key_domainList";
		//播放设置-清晰度设置
		public static final String KEY_PLAYSET_DIFINITION = "playsetDifinition";
	
		// 个性化使用设定-城市定位
		public static final String KEY_PREFERENCE_LOCATION_ID = "preferenceLocationId";
		public static final String KEY_PREFERENCE_LOCATION_TITLE = "preferenceLocationTitle";
		//视频源优化
		public static final String KEY_PREFERENCE_VIDEOSOURCE = "key_preference_videoSource";
	}
	
	public static class KEY_STATICTYPE{
		/**
		 * 事务管理
		 */
		public static final String KEY_TRANS_MANAGER = "key_trans_manager";
		
		/**
		 * 页面管理助手
		 */
		public static final String KEY_PAGEHLEPR = "key_pageHelper";
		
		/**
		 * 事务总线助手
		 */
		public static final String KEY_EVENTHELPER = "key_eventHelper";
		
		/**
		 * 消息handler
		 */
		public static final String KEY_UI_HANDLER = "key_Handler";
		
		/**
		 * sharePerference管理
		 */
		public static final String KEY_SHAREPERFERENCE = "key_sharePerference";
		/**
		 * 域名管理
		 */
		public static final String KEY_DOMAINHELPER = "key_domainHelper";
		
		/**
		 * 网络助手
		 */
		public static final String KEY_HTTPHELPER = "key_HttpHelper";
		
		/**
		 * 关于助手
		 */
		
		public static final String KEY_ABOUTHELPER = "key_AboutHelper";
		
		/**
		 * 蓝牙帮助类
		 */
		
		public static final String KEY_BLUETOOTHHELPER = "key_BluetoothHelper";
		
		/**
		 * 事件控制帮助类
		 */
		
		public static final String KEY_EVENTMANAGERHELPER = "key_EventmanagerHelper";
		
		/**
		 * 按键音帮助类
		 */
		
		public static final String KEY_KEYAUDIOHELPER = "key_KeyAudioHelper";
		/**
		 * 数据库操作类
		 */
		public static final String KEY_DBHELPER = "key_DBHelper";
		/**
		 * 缓存数据库操作类
		 */
		public static final String KEY_CACHEDBHELPER = "key_CACHEDBHelper";
		
		/**
		 * WIFI帮助类
		 */
		public static final String KEY_WIFIHELPER = "key_WIFIHelper";
		
		/**
		 * App数据管理
		 */
		public static final String KEY_DATAMANAGER = "key_DataManagerHelper";
		
				/**
		 * Ethernet帮助类
		 */
		public static final String KEY_ETHERNETHELPER = "key_EthernetHelper";

	}
	
	
	public static class KeyCode {

		public static final int BACK = KeyEvent.KEYCODE_BACK;
		public static final int LEFT = KeyEvent.KEYCODE_DPAD_LEFT;
		public static final int UP = KeyEvent.KEYCODE_DPAD_UP;
		public static final int RIGHT = KeyEvent.KEYCODE_DPAD_RIGHT;
		public static final int DOWN = KeyEvent.KEYCODE_DPAD_DOWN;
		public static final int OK = KeyEvent.KEYCODE_ENTER;
		public static final int MENU = KeyEvent.KEYCODE_MENU;
		public static final int VOLUME_UP = KeyEvent.KEYCODE_VOLUME_UP;
		public static final int VOLUME_DOWN = KeyEvent.KEYCODE_VOLUME_DOWN;
		public static final int VOLUME_MUTE = KeyEvent.KEYCODE_VOLUME_MUTE;
		public final static int NAV_DOWN = KeyEvent.KEYCODE_DPAD_DOWN;
		public static int getKeyCode(KeyEvent event) {
			int keyCode = event.getKeyCode();
			
			switch (keyCode) {
			case KeyEvent.KEYCODE_DPAD_CENTER :
			case KeyEvent.KEYCODE_ENTER :
				return OK;
				
			case KeyEvent.KEYCODE_ESCAPE :
				return BACK;
			
			default :
				return keyCode;
			}
		}
		
	}
	/**
	 * 消息处理事件类型定义
	 */
	public static class KEY_MSGINFO{
		/**
		 * 执行事务消息
		 */
		public static final int KEY_EXECEVENT = 1;
		public static final int KEY_PARSERFINISH = 2;
		public static final int KEY_DBEVENT = 3;
		public static final int KEY_PAGEFINISH = 4;
		public static final int KEY_THREADFINISH = 5;
	}
	
	
	/**
	 * 域名关键字定义
	 */
	public static class KEY_DOMAIN{
		public static final String DOMAIN_VOD = "vod";	
		public static final String DOMAIN_VODUC = "voduc";	
		public static final String DOMAIN_PASSPORT = "passport";
		public static final String DOMAIN_PASSPORT1 = "passport1";
		public static final String DOMAIN_PASSPORT2 = "passport2";
		public static final String DOMAIN_REC = "rec";
		public static final String DOMAIN_API = "api";
		public static final String DOMAIN_API1 = "api1";
		public static final String DOMAIN_API2 = "api2";
		public static final String DOMAIN_U = "u";
		public static final String DOMAIN_SEARCH = "search";
		public static final String DOMAIN_LOG = "log";
		public static final String DOMAIN_LOGUPLOAD = "logupload";
		public static final String DOMAIN_MS = "ms";
		public static final String DOMAIN_OPENAPI = "openApi";
		public static final String DOMAIN_PORTAL = "portaltest";
		public static final String DOMAIN_SPORTS = "sports";
		public static final String DOMAIN_BUS = "bus";
		public static final String DOMAIN_HELP = "help";
		public static final String DOMAIN_MOBILE = "mobile";
		public static final String DOMAIN_PARSE = "parse";
		public static final String DOMAIN_MEDIA= "media";

	}
	
	/**
	 * 网络诊断错误类型
	 */
	public static enum INFO_DETECTION{
		ERROR_DNS_API ,
		ERROR_DNS_PAGE ,
		ERROR_DNS_PLAY ,
		
		ERROR_SERVER_API ,
		ERROR_SERVER_PAGE ,
		ERROR_SERVER_PLAY ,
	
    }
	
	public static class FEEDBACK{
		public static final String TITLE_PLAY_ERROR = "视频无法播放";
		public static final String TITLE_PLAY_INTERRUPT = "视频播放中断";
		public static final String TITLE_PLAY_NOTSYN = "音画不同步";
		public static final String TITLE_PLAY_NOTSMOOTH = "播放卡顿严重";
		public static final String TITLE_PLAY_BLACK = "视频播放黑屏";
		
		public static final String TITLE_INFO_ERROR = "节目信息错误";
		public static final String TITLE_INTO_NOTSAME = "节目与视频不符";
		public static final String TITLE_INFO_NOTCOMPLETE = "剧集集数不全";
		public static final String TITLE_INFO_NONE = "没有我要看的";
		public static final String TITLE_INFO_OTHER = "其它问题及意见";
	}
	
}
